import { EnumManager_blxf } from "../Manager/EnumManager";
import AudioModule_blxf from "../Module/AudioModule";


/** 按钮类型 */
enum ButtonType {
    // 点击按钮
    BTN_COMMON = 'common',
    BTN_TEST = 'test'
}

const {ccclass, property} = cc._decorator;

/** 按钮基类 */
@ccclass
export class BaseButton_blxf extends cc.Button {

    // @property({ type: ButtonType, tooltip: '按钮类型' })
    // btnType: ButtonType = ButtonType.BTN_COMMON;

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.node.on('touchstart', this.onTouchStart_blxf, this)
    }

    start () {

    }

    // update (dt) {}

    onTouchStart_blxf () {
        // let { AUDIO_TOUCH_BTN, AUDIO_DIALOGUE } = EnumManager_blxf.gameAudioType;
        // AudioModule_blxf.instance.playAudio_blxf( AUDIO_DIALOGUE || AUDIO_TOUCH_BTN );

        AudioModule_blxf.playTouchAudio_blxf();
    }

}
